package com.ruoyi.common.core.utils;

public class DESedeTest {

    public static void main(String[] args) {
        String key = HttpRequestUtils.getProvinceSystemToken();
        System.out.println("省平台token: ");
        System.out.println(key);
        String str1 = null, str2 = null;
        String msg = "15183150879";
        System.out.println("加密前: ");
        System.out.println(msg);

        //加密
        try {
            str1 = DESedeUtils.encrypt(msg, key);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("加密后: ");
        System.out.println(str1);

        //解密
        try {
            str2 = DESedeUtils.decrypt(str1, key);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println("解密后: ");
        System.out.println(str2);
    }

}
